
<div class='span12'>
    <!-- HEADER -->
    <div class='row-fluid'>
        <div class='span12'>
            <div class='page-header'>
                <h1>
                    <i class='icon-cogs'></i>
                    <span>UTILITY</span>
                </h1>
            </div>
        </div>
    </div>

    <!-- END OF HEADER -->


    <div class="row-fluid">
        <div class="span12 box bordered-box blue-border">
            <div class="box-header dark-background">
                <div class="title">Database Backup</div>
                <div class="actions">
                    <a href="#" class="btn box-remove btn-mini btn-link"  <?php if(Config::get('application.mode')){?>onclick="alert ('Sorry! Not allowed in demo mode '); return false;" 
                                        <?}else{?>onclick="return confirm('Are you sure ?');"<?php }?> ><i class="icon-remove"></i>
                    </a>
                    <a href="#" class="btn box-collapse btn-mini btn-link"  <?php if(Config::get('application.mode')){?>onclick="alert ('Sorry! Not allowed in demo mode '); return false;" 
                                        <?}else{?>onclick="return confirm('Are you sure ?');"<?php }?>><i></i>
                    </a>
                </div>
            </div>

            <div class="box-content">
                <form method="post" action="<?= URL::current();?>">
                <p>
                    <small>Database backup manager for dumping the databases</small>

                </p>

                <p>
                        <button id="test" type="submit" class="btn btn-large btn-primary"  <?php if(Config::get('application.mode')){?>onclick="alert ('Sorry! Not allowed in demo mode '); return false;" 
                                        <?}else{?>onclick="return confirm('Are you sure ?');"<?php }?>>Start Backup</button>
                        <span id="ajax_msg"></span>
                </p>

                </form>

                <hr class="hr-normal">
                <div class="responsive-table">
                    <div class="scrollable-area">
                        <table class="table table-hover table-striped" >
                            <thead>
                            <tr>
                                <th>
                                    #
                                </th>

                                <th>
                                    File Name
                                </th>
                                <th>
                                    Size
                                </th>
                                <th>
                                    <div class="text-right">
                                    Delete
                                        </div>
                                </th>

                            </tr>
                            </thead>
                            <tbody>

                            <?php foreach($backup as $backup):?>
                            <tr>
                                <td><i class="icon-file icon-2x text-blue"></i> </td>
                                <td><?= $backup->file;?> </td>
                                <td>
                                    <span class="label label-important"><?= round($backup->size/1024/1024,3);?></span> MB
                                </td>
                                <td>
                                    <div class="text-right">
                                        <a class="btn btn-success btn-mini" href="<?= url::to('admin/utility/backup/download/'.$backup->file);?>" title="Download"  <?php if(Config::get('application.mode')){?>onclick="alert ('Sorry! Not allowed in demo mode '); return false;" 
                                        <?}else{?>onclick="return confirm('Are you sure ?');"<?php }?>>
                                            <i class="icon-download"></i>
                                        </a>
<<<<<<< .mine
                                        <a class="btn btn-danger btn-mini" href="<?= 'backup/delete/',$backup->id; ?>" title="Delete">
=======
                                        <a class="btn btn-danger btn-mini" href="#" title="Delete"  <?php if(Config::get('application.mode')){?>onclick="alert ('Sorry! Not allowed in demo mode '); return false;" 
                                        <?}else{?>onclick="return confirm('Are you sure ?');"<?php }?>>
>>>>>>> .r455
                                            <i class="icon-trash"></i>
                                        </a>
                                    </div>
                                </td>
                            </tr>
                            <?php endforeach;?>

                            </tbody>
                        </table>
                    </div>
                </div>

            </div>
        </div>
    </div>


    <!-- END OF CONTENT -->
</div>
